// FileName: ContactUs.ts
// ProjectName: miu-club-html
// 作者：区区电脑
// createTime: 2019/9/26

export class ContactUs {
    public name!: string;
    public email?: string;
    public tel?: string;
    public qq?: string;
    public github?: string;
    public address?: string;
    public message?: string;
}

const $contactUs = (us: ContactUs) => {
    let normal: string = '^_^';
    let str = '——————————————————————————————————————————————————————————————\n';
    if (us.name) {
        // str += 'Power by ' + us.name;
        console.log('%c%s', 'background-color: red;color: white;border-radius: 4px;padding: 10px;', 'Powered by ' + us.name);
    }
    if (us.email) {
        str += 'e-mail ' + us.email;
    }
    if (us.tel) {
        str += '\ntel tel://' + us.tel;
    }
    if (us.qq) {
        str += '\nqq ' + us.qq;
    }
    if (us.github) {
        str += '\ngithub ' + us.github;
    }
    if (us.address) {
        str += '\naddress ' + us.address;
    }
    if (us.message) {
        str += '\n' + us.message + normal;
    }
    str += '\n________________________________________________________________';
    // eslint-disable-next-line no-console
    console.log('%c%s', 'border-left: 1px solid red;color: red; padding: 5px 10px;', str);
};
export {
    $contactUs
}
